﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ctrl
{
    public partial class myControl : UserControl
    {
        public myControl()
        {
            InitializeComponent();
        }

        private Button b;
        private void button1_MouseEnter(object sender, EventArgs e)
        {
            var b = (Button)sender;
            b.ForeColor = Color.White;
        }

        private void button1_MouseLeave(object sender, EventArgs e)
        {
            var b = (Button)sender;
            b.ForeColor = Color.Black;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Form 1");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Form 2");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Form 3");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Form 4");
        }
    }
}
